﻿<%@ WebHandler Language="C#" Class="ToSetGs" %>

using System;
using System.Data;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.SessionState;
using BLL;
public class ToSetGs : IHttpHandler, IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";


        string id = context.Request.Params["id"].ToString();
        string no = context.Request.Params["Tno"].ToString();


        PublicSqlService p = new PublicSqlService();
        string v = p.GetWords("TblUserInfo", "AccountNo", "UID="+id);
        if (v.Trim() == "")
        {
            context.Response.Write("失败");
            return;
        }
        Hashtable hs = new Hashtable();
        hs.Add("CreateUserID", id);
        hs.Add("AccountNo", v);
        if (new PublicSqlService().Update(hs, "Tbl_WayBill", "TrackingNo='" + no.Trim() + "'"))
        {



            context.Response.Write("ok");
        }
        else
        {
            context.Response.Write("失败");
        }

    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}